﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.ServiceModel;
using ZIC20;
using log4net.Config;
using log4net;
namespace ZICWin32Svc
{
    public partial class Service1 : ServiceBase
    {
        ServiceHost sHost;
        ILog log;

        public Service1()
        {
            InitializeComponent();
            log = LogManager.GetLogger(typeof(Service1));
        }

        protected override void OnStart(string[] args)
        {
            log.Info("ZIC Service Started");
            sHost = new ServiceHost(typeof(ZICService));
            sHost.Open();
        }

        protected override void OnStop()
        {
            sHost.Close();
            log.Info("ZIC Service Closed");
        }

    }
}
